<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">GREEDYKLS</b>
<td valign="baseline" align="right" class="function"><a href="../kernels/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table>
  <p><b>Greedy Regularized Kernel Least Squares.</b></p>
  <hr>
<div class='code'><code>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Synopsis:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;greedykls(X)</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;greedykls(X,options)</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;This&nbsp;function&nbsp;approximates&nbsp;input&nbsp;vectors&nbsp;X&nbsp;in&nbsp;the&nbsp;feature</span><br>
<span class=help>&nbsp;&nbsp;space&nbsp;using&nbsp;GREEDYKPCA.&nbsp;Then&nbsp;the&nbsp;regularized&nbsp;least&nbsp;squares</span><br>
<span class=help>&nbsp;&nbsp;are&nbsp;applied&nbsp;on&nbsp;the&nbsp;approximated&nbsp;data.&nbsp;</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;See&nbsp;help&nbsp;of&nbsp;KLS&nbsp;for&nbsp;more&nbsp;info&nbsp;about&nbsp;regularize&nbsp;least&nbsp;squares.</span><br>
<span class=help>&nbsp;&nbsp;See&nbsp;help&nbsp;of&nbsp;GREEDYKPCA&nbsp;for&nbsp;more&nbsp;info&nbsp;on&nbsp;approximation&nbsp;of&nbsp;data</span><br>
<span class=help>&nbsp;&nbsp;in&nbsp;the&nbsp;feature&nbsp;space.</span><br>
<span class=help>&nbsp;&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;X&nbsp;[dim&nbsp;x&nbsp;num_data]&nbsp;Input&nbsp;column&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;y&nbsp;[num_data&nbsp;x&nbsp;1]&nbsp;Output&nbsp;values.</span><br>
<span class=help>&nbsp;&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;options&nbsp;[struct]&nbsp;Control&nbsp;parameters:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.ker&nbsp;[string]&nbsp;Kernel&nbsp;identifier.&nbsp;See&nbsp;HELP&nbsp;KERNEL&nbsp;for&nbsp;more&nbsp;info.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.arg&nbsp;[1&nbsp;x&nbsp;narg]&nbsp;Kernel&nbsp;argument.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.m&nbsp;[1x1]&nbsp;Maximal&nbsp;number&nbsp;of&nbsp;base&nbsp;vectors&nbsp;(Default&nbsp;m=0.25*num_data).</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.p&nbsp;[1x1]&nbsp;Depth&nbsp;of&nbsp;search&nbsp;for&nbsp;the&nbsp;best&nbsp;basis&nbsp;vector&nbsp;(Default&nbsp;p=m).</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.mserr&nbsp;[1x1]&nbsp;Desired&nbsp;mean&nbsp;squared&nbsp;reconstruction&nbsp;errors&nbsp;of&nbsp;approximation.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.maxerr&nbsp;[1x1]&nbsp;Desired&nbsp;maximal&nbsp;reconstruction&nbsp;error&nbsp;of&nbsp;approximation.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See&nbsp;'help&nbsp;greedyappx'&nbsp;for&nbsp;more&nbsp;info&nbsp;about&nbsp;the&nbsp;stopping&nbsp;conditions.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.verb&nbsp;[1x1]&nbsp;If&nbsp;1&nbsp;then&nbsp;some&nbsp;info&nbsp;is&nbsp;displayed&nbsp;(default&nbsp;0).</span><br>
<span class=help>&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;[struct]&nbsp;Kernel&nbsp;projection:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.Alpha&nbsp;[nsv&nbsp;x&nbsp;new_dim]&nbsp;Multipliers&nbsp;defining&nbsp;kernel&nbsp;projection.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.sv.X&nbsp;[dim&nbsp;x&nbsp;num_data]&nbsp;Selected&nbsp;subset&nbsp;of&nbsp;the&nbsp;training&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.nsv&nbsp;[1x1]&nbsp;Number&nbsp;of&nbsp;basis&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.kercnt&nbsp;[1x1]&nbsp;Number&nbsp;of&nbsp;kernel&nbsp;evaluations.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.MaxErr&nbsp;[1&nbsp;x&nbsp;nsv]&nbsp;Maximal&nbsp;reconstruction&nbsp;error&nbsp;for&nbsp;corresponding</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number&nbsp;of&nbsp;base&nbsp;vectors.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;.MsErr&nbsp;[1&nbsp;x&nbsp;nsv]&nbsp;Mean&nbsp;square&nbsp;reconstruction&nbsp;error&nbsp;for&nbsp;corresponding</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number&nbsp;of&nbsp;base&nbsp;vectors.</span><br>
<span class=help>&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Example:</span></span><br>
<span class=help>&nbsp;&nbsp;x&nbsp;=&nbsp;[0:0.05:2*pi];&nbsp;y&nbsp;=&nbsp;sin(x)&nbsp;+&nbsp;0.1*randn(size(x));</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;=&nbsp;greedykls(x,y(:),struct('ker','rbf','arg',1,'lambda',0.001));</span><br>
<span class=help>&nbsp;&nbsp;y_est&nbsp;=&nbsp;kernelproj(x,model);</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;hold&nbsp;on;</span><br>
<span class=help>&nbsp;&nbsp;plot(x,y,'+k');&nbsp;plot(x,y_est,'b');&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;plot(x,sin(x),'r');&nbsp;plot(x(model.sv.inx),y(model.sv.inx),'ob');</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=also_field>See also </span><span class=also></span><br>
<span class=help><span class=also>&nbsp;&nbsp;&nbsp;<a href = "../kernels/kernelproj.html" target="mdsbody">KERNELPROJ</a>,&nbsp;<a href = "../kernels/extraction/kpca.html" target="mdsbody">KPCA</a>,&nbsp;<a href = "../kernels/extraction/greedykpca.html" target="mdsbody">GREEDYKPCA</a>.</span><br>
<span class=help></span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../kernels/list/greedykls.html">greedykls.m</a>
  <p><b class="info_field">About: </b>  Statistical Pattern Recognition Toolbox<br>
 (C) 1999-2005, Written by Vojtech Franc and Vaclav Hlavac<br>
 <a href="http://www.cvut.cz">Czech Technical University Prague</a><br>
 <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a><br>
 <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a><br>

  <p><b class="info_field">Modifications: </b> <br>
 01-mar-2005, VF<br>
 22-feb-2005, VF<br>

</body>
</html>
